package spring.spring_aop.aspect;


import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;


/**
 * 这里实现自定义注解行为
 */
@Slf4j
@Component
@Aspect
public class myAspectRea {
    @Before("@annotation(spring.spring_aop.aspect.MyAspect)")
    public void before() {
        log.info("自定义执行之前");
    }

    @After("@annotation(spring.spring_aop.aspect.MyAspect)")
    public void after() {
        log.info("自定义执行之后");
    }

}









